using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using BoOnce.Components;
using BoOnce.Steps;
using BoOnce.Helpers;

namespace BoOnce.Menu
{
    class OptionMenu : MenuScreen
    {
        public enum Difficulty { EASY, NORMAL, HARD }
        private Difficulty _SelectedDifficulty;
        private MenuItem Item;

        public OptionMenu(Menu menu)
            : base(menu,"Option")
        {
            _SelectedDifficulty = Difficulty.EASY;
            Item = new MenuItem("Entry <" + _SelectedDifficulty + ">");
            Item.Selected += EntrySelected;

            MenuItem Back = new MenuItem("Back");
            Back.Selected += BackSelected;

            Add(Item);
            Add(Back);
        }

        void EntrySelected(object sender, EventArgs e)
        {
            Logger.WriteInfo("Entry selected");
        }

        void BackSelected(object sender, EventArgs e)
        {
            Logger.WriteInfo("Two player selected");
            _Menu.TransitionTo("main");
        }


        public override void LoadContent()
        {
            base.LoadContent();
        }

        public override void Update(GameTime gameTime)
        {
            //if (InputComponent.IsNewPress(PlayerIndex.One, InputComponent.Buttons.Down))
            //    HighlightNextEntry();

            //if (InputComponent.IsNewPress(PlayerIndex.One, InputComponent.Buttons.Up))
            //    HighlightPreviousEntry();

            //if (InputComponent.IsNewPress(PlayerIndex.One, InputComponent.Buttons.Action1))
            //    SelectHighlightedEntry();
                
            base.Update(gameTime);
        }
    }
}
